/**
 * interface which represent a Mathematical Expression. 
 * 
 * @author Nadav Cohen, Matan Monitz
 *
 */
public interface Expression {
	/**
	 * calculate the value of the Mathematical Expression according to the values of the Expression's Variables as given in the parameter.
	 * @param assignments - a group of Variables and their values (an object which implements Assignments)
	 * @return the value of the entire Expression as a real number  
	 */
	double evaluate(Assignments assignments);
	/**
	 * derive the Mathematical Expression according to the parameter given, and return the new Mathematical Expression given as the derivative.
	 * @param var - a Variable. the method will regard this Variable as the Expression Variable during the derive
	 * @return  a new Mathematical Expression which is the derive of the genuine.
	 */
	Expression derivative(Variable var);
	
}
